function inactivity(timeoutTime) {
    msecs = (timeoutTime * 1000);
    setTimeout('warningcallback()', msecs)
}

function inactivity_hour() {
    inactivity(3600);
}

function warningcallback() {
    warning = document.createElement('div');
    warning.setAttribute('style', 'text-align: center; background-attachment: scroll; background-clip: border-box; background-color: #FCC; border-bottom-color: #ff0000; border-bottom-style: solid; border-bottom-width: 1px; color: #000000; display: block; height: 30px; font-weight: bold; left: 0px; margin: 0px 0px 0px 0px; padding: 10px 25px 10px 10px; position: fixed; top: 0px; width: 100%; z-index: 10000;')
    warning.setAttribute('id', 'warn_pop_up_top')
    warning.innerHTML = '<span style="font-style: italic;">This page has been open for over an hour. Therefore, due to inactivity, your session may have expired. Ensure any data on this page you have changed is saved before refreshing.</span> <button class="btn" onclick="warningHide();">[OK]</button>';
    document.getElementsByTagName('body')[0].appendChild(warning);
}

function warningHide() {
    document.getElementById('warn_pop_up_top').parentNode.removeChild(document.getElementById('warn_pop_up_top'));
}